package com.qtjf.qtmoneyservice.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.qtjf.qtmoneyservice.R;

import java.util.List;

/**
 * Created by Administrator on 2016/12/6 0006.
 */

public class YouHuiRecyclerAdapter extends RecyclerView.Adapter<YouHuiRecyclerAdapter.SimpleViewHolder> {

    private List<String> lists;
    private Context mContext;
    private LayoutInflater layoutInflater;


    public YouHuiRecyclerAdapter(List<String> lists, Context mContext) {
        this.lists = lists;
        this.mContext = mContext;
        layoutInflater = LayoutInflater.from(mContext);
    }

    @Override
    public SimpleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View itemView = layoutInflater.inflate(R.layout.youhui_recycler_view, parent, false);
        return new SimpleViewHolder(itemView);
    }

    @Override
    public void onBindViewHolder(final SimpleViewHolder holder, final int position) {
            //绑定数据
    }

    @Override
    public int getItemCount() {
        return lists.size();
    }

    protected final static class SimpleViewHolder extends RecyclerView.ViewHolder {


        //初始化控件
        public SimpleViewHolder(View itemView) {
            super(itemView);
        }
    }
}
